home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / c++ / cplxerr.z / cplxerr
Encoding:
Text File  |  2002-10-03  |  5.5 KB  |  115 lines

  1. CPLXERR(3C)                                           Last changed: 3-22-99
  2.  
  3.  
  4. NNAAMMEE
  5.      ccoommpplleexx__eerrrroorr - Error-handling function for the C++ Complex Math
  6.      Library
  7.  
  8. SSYYNNOOPPSSIISS
  9.      ##iinncclluuddee <<ccoommpplleexx..hh>>
  10.      ccllaassss cc__eexxcceeppttiioonn
  11.      {{
  12.           iinntt  ttyyppee;;
  13.           cchhaarr **nnaammee;;
  14.           ccoommpplleexx   aarrgg11;;
  15.           ccoommpplleexx   aarrgg22;;
  16.           ccoommpplleexx   rreettvvaall;;
  17.  
  18.      ppuubblliicc::
  19.  
  20.           cc__eexxcceeppttiioonn(( cchhaarr **nn,, ccoonnsstt ccoommpplleexx&& aa11,, ccoonnsstt ccoommpplleexx&& aa22 ==
  21.      ccoommpplleexx__zzeerroo ));;
  22.  
  23.           ffrriieenndd iinntt     ccoommpplleexx__eerrrroorr(( cc__eexxcceeppttiioonn&& ));;
  24.  
  25.           ffrriieenndd ccoommpplleexx eexxpp(( ccoommpplleexx ));;
  26.           ffrriieenndd ccoommpplleexx ssiinnhh(( ccoommpplleexx ));;
  27.           ffrriieenndd ccoommpplleexx ccoosshh(( ccoommpplleexx ));;
  28.           ffrriieenndd ccoommpplleexx lloogg(( ccoommpplleexx ));;
  29.  
  30.      }};;
  31.  
  32. IIMMPPLLEEMMEENNTTAATTIIOONN
  33.      IRIX systems (--oo3322 ABI only)
  34.  
  35. DDEESSCCRRIIPPTTIIOONN
  36.           NOTE: This man page applies only to the --oo3322 ABI.  The MIPSpro
  37.           --nn3322 and --6644 ABIs support the template-based complex class which
  38.           is included in the C++ standard library and is automatically
  39.           loaded by the MIPSpro C++ compiler.  The --llmm option must still be
  40.           used to link the math library.
  41.  
  42.      In the following description of the ccoommpplleexx error handling routine, _i
  43.      is of type iinntt and _x is of type cc__eexxcceeppttiioonn.
  44.  
  45.      _i == ccoommpplleexx__eerrrroorr((_x))     Invoked by functions in the C++ Complex
  46.                               Mathematics Library when errors are detected.
  47.  
  48.      Users may define their own procedures for handling errors, by defining
  49.      a function named ccoommpplleexx__eerrrroorr in their programs.  ccoommpplleexx__eerrrroorr must
  50.      be of the form previously described.
  51.  
  52.      The ttyyppee element is an integer describing the type of error that has
  53.      occurred, from the following list of constants (defined in the header
  54.      file):
  55.  
  56.           SING      argument singularity
  57.           OVERFLOW  overflow range error
  58.           UNDERFLOW underflow range error
  59.  
  60.      The nnaammee element points to a string containing the name of the
  61.      function that incurred the error.  The aarrgg11 and aarrgg22 variables are the
  62.      arguments with which the function was invoked.  rreettvvaall is set to the
  63.      default value that will be returned by the function unless the user's
  64.      ccoommpplleexx__eerrrroorr function sets it to a different value.
  65.  
  66.      If the user's ccoommpplleexx__eerrrroorr function returns non-zero, no error
  67.      message will be printed, and eerrrrnnoo will not be set.
  68.  
  69.      If ccoommpplleexx__eerrrroorr is not supplied by the user, the default error-
  70.      handling procedures, described with the complex math functions
  71.      involved, will be invoked upon error.  These procedures are also
  72.      summarized in the following table.  In every case, eerrrrnnoo is set to
  73.      EEDDOOMM or EERRAANNGGEE and the program continues.
  74.  
  75.      Note that complex math functions call functions included in the math
  76.      library which has its own error handling routine, mmaatthheerrrr(3M).  Users
  77.      may also override this routine by supplying their own version.
  78.  
  79.      -----------------------------------------------------------------
  80.                      DEFAULT ERROR HANDLING PROCEDURES
  81.      -----------------------------------------------------------------
  82.                                           Types of Errors
  83.               type
  84.               errno               SING
  85.                                   EDOM        OVERFLOW
  86.                                                ERANGE      UNDERFLOW
  87.                                                              ERANGE
  88.      EXP:
  89.      real too large/small          --       (+H, +H)      (0, 0)
  90.      imag too large                --       (0, 0)
  91.      LOG:
  92.      arg = (0, 0)             M, (H, 0)          --            --
  93.      SINH:
  94.      real too large                --       (+H, +H)           --
  95.      imag too large                --       (0, 0)             --
  96.      COSH:
  97.      real too large                --       (+H, +H)           --
  98.      imag too large                --       (0, 0)             --
  99.      -----------------------------------------------------------------
  100.  
  101.      -------------------------------------------------------
  102.        ABBREVIATIONS
  103.      -------------------------------------------------------
  104.      M                   Message is printed (EDOM error).
  105.      (H, 0)              (HUGE, 0) is returned.
  106.      (+H, +H)            (+HUGE, +HUGE) is returned.
  107.      (0, 0)              (0, 0) is returned.
  108.      -------------------------------------------------------
  109.  
  110. SSEEEE AALLSSOO
  111.      ccoommpplleexx(3C), ccaarrttppooll(3C), ccppllxxooppss(3C), ccppllxxeexxpp(3C), ccppllxxttrriigg(3C),
  112.      mmaatthheerrrr(3M)
  113.  
  114.      This man page is available only online.
  115.